<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/jsp/base/pageBase.jsp" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<tiles:insertTemplate template="/jsp/layout/mainLayout.jsp" flush="true">
    <%-- 画面的标题 --%>
    <tiles:putAttribute name="pageTitle" value="数据字典"/>

    <%-- 画面主面板 --%>
    <tiles:putAttribute name="mainContentinner" type="string">
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins m0 mt10 mb10">
                        <div class="ibox-content">
                            <form method="post" class="form-horizontal registerform" id="mainForm">
                                <input type="hidden" id="id" name="id"
                                       value='<c:out value="${record.id}"></c:out>'/>
                                <input type="hidden" id="jdSpaceIdInput" name="jdSpaceIdInput"
                                       value='<c:out value="${record.jdSpaceId}"></c:out>'/>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">仓库Id</label>

                                    <div class="col-sm-9">
                                        <span class="form-control" style="border: 0 !important;">${record.hrdWarehouseId}</span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">仓库名称</label>

                                    <div class="col-sm-9">
                                        <span class="form-control" style="border: 0 !important;">${record.hrdWarehouseName}</span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">金蝶仓库</label>

                                    <div class="col-sm-9">
                                        <input type="hidden" id="jdWarehouseNumber" name="jdWarehouseNumber" value='<c:out value="${record.jdWarehouseNumber}"></c:out>'/>
                                        <select id="jdWarehouseId" name="jdWarehouseId" class="form-control required">
                                            <option value="请选择"></option>
                                            <c:if test="${!empty warehouseList}">
                                                <c:forEach items="${warehouseList }" var="warehouse" begin="0" step="1" varStatus="status">
                                                    <c:choose>
                                                        <c:when test="${record.jdWarehouseId == warehouse.id }">
                                                            <option value="${warehouse.id}" data-role="${warehouse.name }" selected="selected">${warehouse.name }</option>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <option value="${warehouse.id }" data-role="${warehouse.name }">${warehouse.name }</option>
                                                        </c:otherwise>
                                                    </c:choose>
                                                </c:forEach>
                                            </c:if>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">金蝶库位</label>

                                    <div class="col-sm-9">
                                        <input type="hidden" id="jdSpaceNumber" name="jdSpaceNumber" value='<c:out value="${record.jdSpaceNumber}"></c:out>'/>
                                        <select id="jdSpaceId" name="jdSpaceId" class="form-control required">
                                            <option value="">请选择</option>
                                        </select>
                                    </div>
                                </div>


                                <div class="hr-line-dashed"></div>
                                <div class="form-group mb10">
                                    <div class="col-sm-12 text-center">
                                        <button type="button" class="btn btn-add btn-lg btn-success fn-Save" style="margin-bottom: 15px;"
                                                title="保存">
                                            <i class="fa fa-save" aria-hidden="true"> 保存</i>
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </tiles:putAttribute>

    <%-- 画面的CSS (ignore) --%>
    <tiles:putAttribute name="pageCss" type="string">
    </tiles:putAttribute>

    <%-- JS全局变量定义、插件 (ignore) --%>
    <tiles:putAttribute name="pageGlobalImport" type="string">
        <link href="${webRoot}/js/plugins/validform/css/style.css" rel="stylesheet">
    </tiles:putAttribute>

    <%-- Javascripts required for this page only (ignore) --%>
    <tiles:putAttribute name="pageJavaScript" type="string">
        <script type='text/javascript' src="${webRoot}/js/plugins/validform/js/Validform_v5.3.2.js"></script>
        <jsp:include page="warehouse_info.js.jsp"/>
    </tiles:putAttribute>

</tiles:insertTemplate>


